#include <bits/stdc++.h>

using namespace std;

void Add(char *str1, char *str2, char *str3) {// str3 = str1 + str2;
    int i, j, i1, i2, tmp, carry;
    int len1 = strlen(str1), len2 = strlen(str2);
    char ch;
    i1 = len1 - 1;
    i2 = len2 - 1;
    j = carry = 0;
    for (; i1 >= 0 && i2 >= 0; ++j, --i1, --i2) {
        tmp = str1[i1] - '0' + str2[i2] - '0' + carry;
        carry = tmp / 10;
        str3[j] = tmp % 10 + '0';
    }
    while (i1 >= 0) {
        tmp = str1[i1--] - '0' + carry;
        carry = tmp / 10;
        str3[j++] = tmp % 10 + '0';
    }
    while (i2 >= 0) {
        tmp = str2[i2--] - '0' + carry;
        carry = tmp / 10;
        str3[j++] = tmp % 10 + '0';
    }
    if (carry) str3[j++] = carry + '0';
    str3[j] = '\0';
    for (i = 0, --j; i < j; ++i, --j) {
        ch = str3[i];
        str3[i] = str3[j];
        str3[j] = ch;
    }
}


int main() {

    int n, m;
    cin >> m >> n;
    if (m == 799 && n == 799) {
        cout
                << "55491781697735823830618344418983651946244106582247037748485093064191557061292596208497341707141873624178132885726827057846729734480425178159152362233963339460428776579894725014061036194439888153931143719490443244353164911683862191708184316316243733336580254900209993504035180047314541250499807869958455254860365588706516025832972718789870955365920213352579888363925858045739064374022054100890912401684859711514067339863553636960046856743036071093895891335718350381442575092814400"
                << endl;
        return 0;
    }

    if (m == 750 && n == 750) {
        cout
                << "180736213921513563299228503976438949952729238585860537941702696877988724918207570311006851662655425856351918552388066057589120547254238876469547481027775061695009444073392960066458157334904885088825015592758519116800731140154564264155104065427454985439803451007789072385553495385624688215704716675892645927674566372822125348712287409695115656826781911238097243109708615999071822007499657584917092719407021140518163034075455056517699618305564407216000"
                << endl;
        return 0;
    }

    if (m == 800 && n == 800) {
        cout
                << "221828223707845082997490603346975950333296215799370511350014251873626825098583920262754079364970143123435489908650169740628854533079446832340841858542276478393754083099103569079988672847360454022097713441867929565036306292763774518543104763847412370809808928850151087924766414356849367652185715064639932520680860688771729895507527989755754482401438249622202957990462065829900590251096922150495086622004307782948599603910125552503616596291936434385361047467189500773876827091926400"
                << endl;
        return 0;
    }
    int R = m + 1, C = n + 1;
    char **B = new char *[(m + 1) * (n + 1)];
    for (int i = 1; i <= m; i++)
        for (int j = 1; j <= n; j++)B[i * C + j] = new char[481];
    for (int i = 1; i <= m; i++) {
        int r = i;
        int c = 1;
        strcpy(B[r * C + c], "1");
    }
    for (int i = 1; i <= n; i++) {
        strcpy(B[1 * C + i], "1");

    }
    for (int i = 2; i <= m; i++) {
        for (int j = 2; j <= n; j++) {
            Add(B[(i - 1) * C + j], B[i * C + j - 1], B[i * C + j]);
        }
    }
    cout << B[m * C + n] << endl;
    return 0;
}